package com.example.xd.materialdemo

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity(), View.OnClickListener {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        floating.setOnClickListener(this)
        shapeableImageView.setOnClickListener(this)
        tv_Material.setOnClickListener(this)
    }

    override fun onClick(v: View?) {
        when (v) {
            floating -> {
                startActivity(Intent(this, FloatingActionButton_Activity::class.java))
            }
            shapeableImageView -> {
                startActivity(Intent(this, ShapeableImageView_Activity::class.java))

            }
            tv_Material -> {
                startActivity(Intent(this, MaterialRadioButton_Activity::class.java))

            }
        }
    }
}
